package tool;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Util {
    private static final String Url="jdbc:mysql://localhost:3306/map";
    private static final String User="root";
    private static final String Password="20050606a";
    public Connection getConnection() {
        Connection connection=null;
        try{
            Class.forName("com.mysql.cj.jdbc.Driver");
            connection=DriverManager.getConnection(Url,User,Password);
        }catch(ClassNotFoundException | SQLException e)
        {
            e.printStackTrace();
        }
        return connection;
    }
}